Skip to main content
DELETE
/
api
/
pedidos
/
{id}
Delete Order
curl --request DELETE \
  --url https://api.example.com/api/pedidos/{id}
Deletes an order from the system. This endpoint is typically restricted to admin users only.

Authentication

Requires JWT token with admin privileges in the Authorization header.
Authorization: Bearer YOUR_ADMIN_JWT_TOKEN
This endpoint requires admin-level permissions. Standard authenticated users cannot delete orders.

Path Parameters

ParameterTypeRequiredDescription
idLongYesOrder ID to delete

Response

Returns no content on successful deletion.

Response Body

Empty response body (204 No Content).

Example Request

curl -X DELETE "https://api.iquea.com/api/pedidos/42" \
  -H "Authorization: Bearer YOUR_ADMIN_JWT_TOKEN" \
  -H "Content-Type: application/json"

Status Codes

CodeDescription
204No Content - Order successfully deleted
401Unauthorized - Invalid or missing token
403Forbidden - User does not have admin privileges
404Order not found
500Internal server error

Notes

  • This is a destructive operation and cannot be undone
  • Consider implementing soft deletes or order cancellation instead
  • All associated order line items (detalles) will also be deleted
  • Audit logs should track order deletions for compliance